import pandas as pd

import pymssql

testinterval = pd.Timedelta('0 days 00:10:00')
testtime = pd.datetime.now()


conget = pymssql.connect(server='172.17.132.12', user='shen_monitor',password='dxs7735', database='OrderCenter')
sqlquery = "select TOTAL_DEPT_NAME, TOTAL, CREATE_TIME, STORE_CITY, IT_MARKET_NAME_CN, " \
           "STORE_CODE,STORE_NAME,LONGITUDE, LATITUDE " \
           "from [OrderCenter].[dbo].[OC_ORDER_T_SALES] as sale WITH(SNAPSHOT), " \
           "[OrderCenter].[dbo].[OC_CENTER_T_STORE] as store " \
           "where DATEDIFF(DD, BUSINESS_DATE, GETDATE()) = 0 " \
           "and ORDER_SEQUENCE_NUMBER='CNKFC' and sale.STORE_ID = store.STORE_CODE " \
           "and sale.SALE_TYPE='tendered'"

columns = ["ORDER", "AMOUNT", "TIME", "CITY", "MARKET", "CODE", "NAME", "LONGITUDE", "LATITUDE"]